package com.edushare.common.vo;

import com.edushare.common.constants.DefaultFiles;
import com.edushare.common.vo.FileDirectories.DIRECTORY_OWNER_TYPE;
import com.edushare.common.vo.auto._Groups;
import com.edushare.common.vo.interfaces.IFileUploadable;

public class Groups extends _Groups implements IFileUploadable, EduShareEntity {

	private static final long serialVersionUID = -4645783767730151558L;

	public Groups(){
		setSettings("zcv:qd;zcc:qk;");
	}
	
	public int getObjectPrimaryKey() {
		return getGroupId();
	}

	public DIRECTORY_OWNER_TYPE getObjectType() {
		return FileDirectories.DIRECTORY_OWNER_TYPE.GROUP;
	}

	public String getTitle() {
		return getGroupName();
	}

	public String getUploadedFileUrl() {
		if (getImageFile() == null) {
			return DefaultFiles.getDefaultImageFileUrl(this);
		}
		return getImageFile().getFileDownloadUrl();
	}

}
